package com.example.zyl.common.query.enums;

import com.example.zyl.common.utils.EncryptUtils;
import com.example.zyl.common.utils.function.CryptHandle;
import lombok.AllArgsConstructor;

/**
 * 加密算法枚举
 */
@AllArgsConstructor
public enum EncryptAlg {

    MD5(EncryptUtils::encryptByMd5),

    BASE64(EncryptUtils::encryptByBase64),

    AES(EncryptUtils::encryptByAes),

    SM4(EncryptUtils::encryptBySm4),

    RSA(EncryptUtils::encryptByRsa),

    SHA256(EncryptUtils::encryptBySha256);

    //可自行添加其他脱敏策略

    private final CryptHandle<String, String> desensitizer;

    public CryptHandle<String, String> desensitizer() {
        return desensitizer;
    }
}
